package com.haixiaoke.saas.repository.service.impl;

import java.util.List;

import com.haixiaoke.saas.repository.pojo.HouseRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.haixiaoke.saas.repository.mapper.HouseRecordMapper;
import com.haixiaoke.saas.repository.service.IHouseRecordService;

/**
 * 房屋上下架记录Service业务层处理
 *
 * @author haixiaoke
 * @date 2023-04-11
 */
@Service
public class HouseRecordServiceImpl implements IHouseRecordService {
    @Autowired
    private HouseRecordMapper houseRecordMapper;

    /**
     * 查询房屋上下架记录
     *
     * @param id 房屋上下架记录主键
     * @return 房屋上下架记录
     */
    @Override
    public HouseRecord selectHouseRecordById(Long id) {
        return houseRecordMapper.selectHouseRecordById(id);
    }

    /**
     * 查询房屋上下架记录列表
     *
     * @param houseRecord 房屋上下架记录
     * @return 房屋上下架记录
     */
    @Override
    public List<HouseRecord> selectHouseRecordList(HouseRecord houseRecord) {
        return houseRecordMapper.selectHouseRecordList(houseRecord);
    }

    /**
     * 新增房屋上下架记录
     *
     * @param houseRecord 房屋上下架记录
     * @return 结果
     */
    @Override
    public int insertHouseRecord(HouseRecord houseRecord) {
        return houseRecordMapper.insertHouseRecord(houseRecord);
    }

    /**
     * 修改房屋上下架记录
     *
     * @param houseRecord 房屋上下架记录
     * @return 结果
     */
    @Override
    public int updateHouseRecord(HouseRecord houseRecord) {
        return houseRecordMapper.updateHouseRecord(houseRecord);
    }

    /**
     * 批量删除房屋上下架记录
     *
     * @param ids 需要删除的房屋上下架记录主键
     * @return 结果
     */
    @Override
    public int deleteHouseRecordByIds(Long[] ids) {
        return houseRecordMapper.deleteHouseRecordByIds(ids);
    }

    /**
     * 删除房屋上下架记录信息
     *
     * @param id 房屋上下架记录主键
     * @return 结果
     */
    @Override
    public int deleteHouseRecordById(Long id) {
        return houseRecordMapper.deleteHouseRecordById(id);
    }
}
